﻿
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Shapes;

namespace YoucaiReader.Helper.Drawing
{
    public class PolygonImpl : Polygon
    {
        private List<Point> points = new List<Point>();

        public void addPoint(int x, int y)
        {
            this.points.Add(new Point((double)x, (double)y));
        }

        internal System.Windows.Shapes.Polygon Polygon
        {
            get
            {
                System.Windows.Shapes.Polygon polygon = new System.Windows.Shapes.Polygon();
                foreach (Point point in this.points)
                {
                    polygon.Points.Add(point);
                }
                return polygon;
            }
        }
    }
}

